home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-04-02 | 2.0 KB | 48 lines | [TEXT/CCL2] |
-
- ;This code is already loaded when MCL 2.0b1 starts up and the following patches
- ; are also included in the patch2 (.fasl) file. The following source patch is
- ; provided so that the source in the library file is consistent with the
- ; behavior of MCL 2.0b1p2.
-
- ;The install-view-in-window method was called without focusing for drawing.
- ;We fixed it by making the scroll bar be initially invisible (this is
- ;how the other controls work).
-
- ;In library;scroll-bar-dialog-items.lisp, patch the following:
-
-
- (defmethod install-view-in-window :after ((item scroll-bar-dialog-item) view)
- (declare (ignore view))
- (let* ((window (view-window item))
- (my-size (view-size item))
- (my-position (view-position item))
- (setting (scroll-bar-setting item))
- (min (scroll-bar-min item))
- (max (scroll-bar-max item)))
- (when window
- (rlet ((scroll-rect :rect))
- (rset scroll-rect rect.topleft my-position)
- (rset scroll-rect rect.bottomright (add-points my-position my-size))
- (when (dialog-item-handle item)
- (_DisposControl :ptr (dialog-item-handle item)))
- (setf (dialog-item-handle item)
- (_NewControl :ptr (wptr item) ;window
- :ptr scroll-rect ;item rectangle
- :ptr (%null-ptr) ;title
- :boolean nil ;visible-p: invisible initially.
- :word setting ;initial value
- :word min ;min value
- :word max ;max value
- :word 16 ;type of control
- :long 0 ;refcon
- :ptr))
- (unless (window-active-p window)
- (view-deactivate-event-handler item))))))
-
- (defmethod view-draw-contents ((item scroll-bar-dialog-item))
- (let ((handle (dialog-item-handle item)))
- (when handle
- (if (rref handle :control.vis)
- (_Draw1Control :ptr handle)
- (_ShowControl :ptr handle)))))
-